﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
//using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication3
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
           // Patient p = new Patient();
           // MessageBox.Show(p.Name);
            
            PatientForm pf = new PatientForm();
            
           // Patient p = new Patient();
           // MessageBox.Show();


            if (pf.ShowDialog() == DialogResult.OK)
            {

               // Patient p = new Patient();
                //pf.AppPatient();
                //dataGridView1.Rows.Add(, "000");
                //p.Name
               // Name = pf.Name;
               // MessageBox.Show(pf.Name);
                //MessageBox.Show(p.Name);
               dataGridView1.Rows.Add("", "000");
               //MessageBox.Show(p.id.ToString());
            }
            
             
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        public void dataGridView_Rows_Add(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            //dataGridView1.Rows.Add(textBox1.Text, "000");
        }

        public void AppPatient()
        {

        }

    }

     public class Patient
    {
        public int id { get; set; }
        public string Name { get; set; }
        public string SurName { get; set; }
        public string Patronymic { get; set; }
        public DateTime dateOfBirth { get; set; }
        private string p;

    }

}
